package com.yic.module.wms.controller.admin.producein.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import java.time.LocalDateTime;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static com.yic.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 生产入库单 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class ProduceInBaseVO {

    @Schema(description = "工厂", requiredMode = Schema.RequiredMode.REQUIRED, example = "5355")
    @NotNull(message = "工厂不能为空")
    private Long factoryId;

    @Schema(description = "生产计划", requiredMode = Schema.RequiredMode.REQUIRED, example = "12652")
    @NotNull(message = "生产计划不能为空")
    private Long planId;

    @Schema(description = "生产工单", requiredMode = Schema.RequiredMode.REQUIRED, example = "1822")
    @NotNull(message = "生产工单不能为空")
    private Long moId;

    @Schema(description = "产品", requiredMode = Schema.RequiredMode.REQUIRED, example = "8850")
    @NotNull(message = "产品信息不能为空")
    private Long itemId;

    @Schema(description = "产品", requiredMode = Schema.RequiredMode.REQUIRED, example = "30745")
    @NotNull(message = "产品仓储信息不能为空")
    private Long itemWarehouseId;

    @Schema(description = "入库单号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "入库单号不能为空")
    private String code;

    @Schema(description = "批次号")
    private String batchNo;

    @Schema(description = "入库数量", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "入库数量不能为空")
    private BigDecimal inAmount;

    @Schema(description = "仓库", requiredMode = Schema.RequiredMode.REQUIRED, example = "21988")
    @NotNull(message = "仓库不能为空")
    private Long warehouseId;

    @Schema(description = "库区", example = "10030")
    private Long areaId;

    @Schema(description = "库位", example = "19179")
    private Long locationId;

    @Schema(description = "入库日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "入库日期不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime inTime;

    @Schema(description = "制单人", requiredMode = Schema.RequiredMode.REQUIRED, example = "7791")
    private Long userId;

    @Schema(description = "制单部门", example = "30910")
    private Long deptId;

    @Schema(description = "审核人", example = "29852")
    private Long approveUserId;

    @Schema(description = "审核时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime approveTime;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "状态不能为空")
    private Integer status;

    @Schema(description = "同步ERP", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "同步ERP不能为空")
    private Integer toErp;

    @Schema(description = "说明", example = "你猜")
    private String description;

    @Schema(description = "备注", example = "随便")
    private String remark;

    @Schema(description = "报工记录ID", example = "1")
    private Long reportId;

}
